﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace MVCCompany.Controllers.HomeExtensions
{
    public class BoWen
    {
        public string AuthorName { get; set; }
        public string LinkUrl { get; set; }
    }

    public class BoWenZhuanJiaPaiHangController : Controller
    {
        //
        // GET: /BoWenZhuanJiaPaiHang/

        /// <summary>
        /// 模拟返回博问数据
        /// </summary>
        /// <returns></returns>
        public IList<BoWen> MockBoWen()
        {
            IList<BoWen> boWenList = new List<BoWen>();
            for (int i = 0; i <= 10; i++)
            {
                BoWen bowen = new BoWen() { AuthorName = "郭志奇" + i.ToString(), LinkUrl = "http://www.cnblogs.com/jiagoushi" };
                boWenList.Add(bowen);
            }
            return boWenList;
        }


        public ActionResult Index()
        {
            IList<BoWen> boWenList = MockBoWen();
            ViewBag.BoWenList = boWenList;
            return View();
        }

    }
}
